<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://jmix.io/schema/ui/window"
        caption="msg://UserEdit.caption"
        focusComponent="form">
    <data>
        <instance id="userDc"
                  class="su.myjmixprojects.lordsandplanetsjmix.entity.User">
            <fetchPlan extends="_base"/>
            <loader/>
        </instance>
    </data>
    <actions>
        <action id="windowCommitAndClose"
                caption="msg:///actions.Ok"
                icon="EDITOR_OK"
                primary="true"
                shortcut="${COMMIT_SHORTCUT}"/>
        <action id="windowClose"
                caption="msg:///actions.Close"
                icon="EDITOR_CANCEL"/>
    </actions>
    <facets>
        <dataLoadCoordinator auto="true"/>
    </facets>
    <dialogMode height="600"
                width="800"/>
    <layout spacing="true" expand="editActions">
        <form id="form" dataContainer="userDc">
            <column width="350px">
                <textField id="usernameField" property="username" editable="false"/>
                <passwordField id="passwordField"
                               caption="msg://su.myjmixprojects.lordsandplanetsjmix.entity/User.password"
                               required="true"
                               visible="false"/>
                <passwordField id="confirmPasswordField"
                               caption="msg://confirmPassword"
                               required="true"
                               visible="false"/>
                <textField id="firstNameField" property="firstName"/>
                <textField id="lastNameField" property="lastName"/>
                <textField id="emailField" property="email"/>
                <comboBox id="timeZoneField" property="timeZoneId"/>
                <checkBox id="activeField" property="active"/>
            </column>
        </form>
        <hbox id="editActions" spacing="true">
            <button id="commitAndCloseBtn" action="windowCommitAndClose"/>
            <button id="closeBtn" action="windowClose"/>
        </hbox>
    </layout>
</window>
